<?php
namespace Home\Controller;
use Think\Controller;

class LockdetailController extends BaseController  {

    public function _initialize()
    {
        parent::_initialize();
    }


    public function index(){
        header("Content-Type:text/html; charset=utf-8");

        $lockid = I('lockid');

        $lock = M('locktable');

        $lock = $lock->where("id=".$lockid)->find();

        $iamge = "/mall/Public/Resource/img/lock.jpg";
        if('600' == $lockid){
            $iamge = "/mall/Public/Resource/img/p600.png";
        }else if ('610' == $lockid){
            $iamge = "/mall/Public/Resource/img/p610.png";
        }else if('666' == $lockid){
            $iamge = "/mall/Public/Resource/img/pgateway.png";
        }else if('777' == $lockid){
            $iamge = "/mall/Public/Resource/img/pbox.png";
        }


        $this->assign('featrue','<p>联网管理</p>
                        <p>密码秒传</p>
                        <p>超长待机</p>');
        $this->assign('name',$lock['lockname']);
        $this->assign('saleprice','￥'.$lock['price']);
        $this->assign('trueprice','￥'.$lock['trueprice']);
        $this->assign('intro',$lock['intro']);
        $this->assign('specification',$lock['specification']);
        $this->assign('service',$lock['service']);
        $this->assign('intall',$lock['intall']);
        $this->assign('lockid',$lockid);
        $this->assign('image',$iamge);

        $this->display();


    }
}